{% extends "_base.html" %}


{% block bodycontent %}
<h2>{% block header %}Regex Base Template{% endblock %}</h2>

<div id="regex">

<div id="form_and_results" class="row-fluid">

	<!-- Form block -->
	<div id="form" class="span5">
	{% block form %}Form goeth here{% endblock %}
	</div id="form">
	
	<!-- Results block -->
	<div id="results" class="span4">{% block results %}{% if resulttext %}{{ resulttext|safe }}{% else %}Your results will appear here.{% endif %}
	{% endblock %}
	</div id="results">
	
	<div class="span3"></div>

</div id="form_and_results">

<!-- Help message -->
{% block help %}
<a href="#" id="showHideLink">Show Help</a>

<div id="help">
	<p>
		<ul>
			<h3>Flags:</h3>
				<li>i: case insensitive</li>
				<li>m: multiline</li>
				<li>s: dot-all</li>
				<li>x: verbose</li>
				<li>g: global</li>
				<li>(?iLmsux): flags inside regex</li>
			<h3>Syntax:</h3>
				<li>.: any character except newline; any character in s mode</li>
				<li>^: start of string, or end of line in m mode</li>
				<li>$: end of string, or end of line in m mode</li>
				<li>\b: beginning or end of a word</li>
				<li>+: match one or more</li>
				<li>*: match 0 or more</li>
				<li>?: match 0 or 1</li>
				<li>{m,n}: match m to n</li>
				<li>+?, *?, ??, {m,n}?: non-greedy match</li>
				<li>\: escape</li>
				<li>|: OR</li>
			<h3>Character classes:</h3>
				<li>[...]: character class</li>
				<li>[^...]: complementary character class</li>
				<li>\d, \s, \w: matches any number, whitespace, or letter/underscore, respectively</li>
				<li>\D, \S, \W: matches any non-number, non-whitespace, or non-letter/underscore, respectively</li>
			<br>
			<h3>Captures:</h3>
				<li>(...): capture</li>
				<li>(?...): non-capturing parentheses</li>
				<li>(?P&lt;name&gt;...): named capture</li>
				<li>(?=...): Lookahead</li>
				<li>(?!...): Negative lookahead</li>
				<li>(?&lt;=...): Lookbehind</li>
				<li>(?&lt;!...): Negative lookbehind</li>
				<li>\#: matches group number
		</ul>
	</p>
</div id="help">
{% endblock %}



{% block footer %}
<div id="footer">
{{ message }}
</div id="footer">
{% endblock %}

</div id="regex">

{% endblock %}
